package com.yks.demo.lvcr.democlient.service.impl;

import com.yks.demo.lvcr.democlient.entity.DemoClass;
import com.yks.demo.lvcr.democlient.mapper.IDemoClassMapper;
import com.yks.demo.lvcr.democlient.service.IDbService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class DbServiceImpl implements IDbService {
    @Autowired
    private IDemoClassMapper demoClassMapper;

    @Override
    @Transactional
    public void testTransactionTwo(DemoClass demoClass) {

        demoClassMapper.insert(demoClass);

//        throw new RuntimeException("this is a Exception");
    }
}
